#################################################################################
#                                                                               #
#                                                                               #
#                              GraphicsDevPkg                                   #
#                Makefile For Sample Application using dbmp library             #
#                                                                               #
#                                                                               #
#                                                                               #
#################################################################################


# COMPILER USED
CC= g++


# GENERAL DEFINITIONS
BIN_DIR   	  	  = ../../../bin
INCLUDE_DIR   	  = ../../../include
LIBRARY_DEPS 	  = ../../../lib/linux/libvidout.a ../../../Lib/linux/libdbmp.a

SRC_BMPDECODE_DIR = ../../../Decoder/bmpdecode
OBJ_BMPDECODE_DIR = ./Debug
SRC_BMPDECODE     = $(wildcard $(SRC_BMPDECODE_DIR)/*.cpp)
OBJ_BMPDECODE     = $(SRC_BMPDECODE:$(SRC_BMPDECODE_DIR)/%.cpp=$(OBJ_BMPDECODE_DIR)/%.o)
CFLAGS_BMPDECODE  = 
LFLAGS_BMPDECODE  = -lglu32 -lglut32 -lopengl32 



all: bmpdecode

bmpdecode: $(OBJ_BMPDECODE) Makefile
	@echo 'bmpdecode: Creating executable ...'
	@$(CC) -I $(INCLUDE_DIR) $(OBJ_BMPDECODE) $(LIBRARY_DEPS) $(LFLAGS_BMPDECODE) -o $(BIN_DIR)/bmpdecode.exe
	

$(OBJ_BMPDECODE_DIR)/%.o: $(SRC_BMPDECODE_DIR)/%.cpp
	@echo 'generating object file "$@" ...'
	@$(CC) -I $(INCLUDE_DIR) $(CFLAGS_BMPDECODE) -c $< -o $@



# CLEAN
clean: cleanup
	@rm -f $(OBJ_BMPDECODE)
	@rm -f $(BIN_DIR)/bmpdecode.exe
	@echo 'bmpdecode: Removing object Files'
	@echo 'bmpdecode: Removing Executable'

#CLEANUP
cleanup:
	@rm -f $(SRC_BMPDECODE_DIR)/*~
	@rm -f ./*~
	@echo 'bmpdecode: Removing *~ files'







